﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="PlaneList.aspx.cs" Inherits="Admin_PlaneList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h2 align="center">Airplane List</h2>
<p align="center">&nbsp;</p>
<div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" 
        CellPadding="3" DataKeyNames="AirPlaneID" DataSourceID="SqlDataSource1" 
        GridLines="Horizontal" AllowPaging="True" AllowSorting="True">
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <Columns>
            <asp:BoundField DataField="AirPlaneID" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="AirPlaneID"></asp:BoundField>
            <asp:BoundField DataField="Plane_Name" HeaderText="Airplane Name" 
                SortExpression="Plane_Name"></asp:BoundField>
            <asp:BoundField DataField="Total_Bussiness_Class_Seats" 
                HeaderText="Bussiness Seats" SortExpression="Total_Bussiness_Class_Seats">
            </asp:BoundField>
            <asp:BoundField DataField="Total_First_Class_Seats" HeaderText="First Seats" 
                SortExpression="Total_First_Class_Seats"></asp:BoundField>
            <asp:BoundField DataField="Total_Club_Class_Seats" HeaderText="Club Seats" 
                SortExpression="Total_Club_Class_Seats"></asp:BoundField>
        </Columns>
        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <AlternatingRowStyle BackColor="#F7F7F7" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:sqlString %>" 
        SelectCommand="SELECT [AirPlaneID], [Plane Name] AS Plane_Name, [Total Bussiness Class Seats] AS Total_Bussiness_Class_Seats, [Total First Class Seats] AS Total_First_Class_Seats, [Total Club Class Seats] AS Total_Club_Class_Seats FROM [Airline_Airplane]">
    </asp:SqlDataSource>
    <br />
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
        PostBackUrl="~/Admin/AddPlane.aspx" Text="Add New Plane" />
</div>
</asp:Content>

